package org.jeecg.common.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author yyg
 * @date 2022年10月27日
 */
@Getter
public enum ExperienceTypeEnum {

        WORK(1, "工作/实习经历"),
        EDUCATION(2, "教育经历"),
        TRAIN(3, "培训经历"),
        PROJECT(4, "项目经历")
        ;
        private int value;
        private String name;
        private ExperienceTypeEnum(int value, String name) {
                this.value = value;
                this.name = name;
        }

        /**
         * 提前判断，用于解决
         * @param value 值
         * @return
         */
        public static ExperienceTypeEnum getByValue(int value){
                for(ExperienceTypeEnum x:values()) {
                        if(x.getValue() == value){
                                return x;
                        }
                }
                return null;
        }

}
